package com.mzj.saas.rent;

import com.haixiaoke.saas.repository.core.AjaxResult;
import com.haixiaoke.saas.repository.core.BaseController;
import com.haixiaoke.saas.repository.pojo.HotCity;
import com.haixiaoke.saas.repository.service.IHotCityService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * 热门城市Controller
 *
 * @author zhiping
 * @date 2023-04-06
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/hot/city")
public class HotCityController extends BaseController {

    private final IHotCityService hotCityService;

    /**
     * 查询热门城市列表
     */
    @GetMapping("/list")
    public AjaxResult list(HotCity hotCity) {
        List<HotCity> list = hotCityService.selectHotCityList(hotCity);
        return AjaxResult.success(list);
    }

}
